<h2 class="contentTitle">添加资讯</h2>
<form action="<?php echo SITE_URL . 'index.php?a=new&m=ajaxAdd';?>" method="post" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
<div class="pageContent">
	<div layouth="97" class="pageFormContent nowrap" style="height: 376px; overflow: auto;">
        <dl>
            <dt>资讯名称：</dt>
            <dd>
                <input type="text" name="title" value="<?php echo $info['title']; ?>" size="70" class="required textInput valid">
                <span class="inputInfo">填写资讯名称</span>
            </dd>
		</dl>
        <dl>
            <dt>资讯标签：</dt>
            <dd>
                <input type="text" name="tag" value="<?php echo $info['tag']; ?>" size="70" class="required textInput valid">
                <span class="inputInfo">填写资讯标签，站内搜索用</span>
            </dd>
        </dl>
        <dl>
            <dt>资讯类别：</dt>
            <dd>
                <select class="combox" name="category_id">
                    <option value="">请选择类别</option>
                    <?php
                    foreach($category_list as $k=>$v){
                        ?>
                        <option value="<?php echo $k; ?>" <?php echo $info['category_id'] == $k ? 'selected="true"' : ''; ?>><?php echo $v; ?></option>
                    <?php
                    }
                    ?>
                </select>
                <span class="inputInfo">请选择类别</span>
            </dd>
		</dl>
        <dl>
            <dt>资讯来源：</dt>
            <dd>
                <select class="combox" name="source_id">
                    <option value="">请选择来源</option>
                    <?php
                    foreach($source_list as $k=>$v){
                        ?>
                        <option value="<?php echo $k; ?>" <?php echo $info['source_id'] == $k ? 'selected="true"' : ''; ?>><?php echo $v; ?></option>
                    <?php
                    }
                    ?>
                </select>
                <span class="inputInfo">请选择来源</span>
            </dd>
        </dl>
        <dl>
            <dt>资讯状态：</dt>
            <dd>
                <select class="combox" name="status">
                    <option value="1" <?php echo $info['status'] == 1 ? 'selected="true"' : ''; ?>>待审核</option>
                    <option value="2" <?php echo $info['status'] == 2 ? 'selected="true"' : ''; ?>>审核通过</option>
                    <option value="3" <?php echo $info['status'] == 3 ? 'selected="true"' : ''; ?>>审核未通过</option>
                </select>
                <span class="inputInfo">是否显示在主站上</span>
            </dd>
        </dl>
        <dl>
            <dt style="font-weight: bold;color: red">列表推荐：</dt>
            <dd>
                <input type="radio" name="recommend" value="1" <?php echo $info['recommend'] == 1 ? 'checked="true"' : ''; ?>>不推荐
                <input type="radio" name="recommend" value="2" <?php echo $info['recommend'] == 2 ? 'checked="true"' : ''; ?>>推荐
                <span class="inputInfo">是否是推荐资讯</span>
            </dd>
        </dl>
        <dl>
            <dt style="font-weight: bold;color: red">首页推荐：</dt>
            <dd>
                <input type="radio" name="recommend_index" value="1" <?php echo $info['recommend_index'] == 1 ? 'checked="true"' : ''; ?>>不推荐
                <input type="radio" name="recommend_index" value="2" <?php echo $info['recommend_index'] == 2 ? 'checked="true"' : ''; ?>>推荐
                <span class="inputInfo">是否推荐到首页</span>
            </dd>
        </dl>
        <dl>
            <dt>关键词组：</dt>
            <dd>
                <textarea rows="2" cols="60" name="keywords" value="<?php echo $info['keywords']; ?>" id="keywords" class="textInput"></textarea>
                <span class="inputInfo">页面显示时的关键词</span>
            </dd>
		</dl>
        <dl>
            <dt>资讯描述：</dt>
            <dd>
                <textarea rows="2" cols="60" name="description" value="<?php echo $info['description']; ?>" id="description" class="textInput"></textarea>
                <span class="inputInfo">页面显示时的描述信息</span>
            </dd>
        </dl>
        <dl>
            <dt>资讯摘要：</dt>
            <dd>
                <textarea rows="2" cols="60" name="summary" value="<?php echo $info['summary']; ?>" id="summary" class="textInput"></textarea>
                <span class="inputInfo">用于列表页显示资讯用</span>
            </dd>
        </dl>
        <dl>
            <dt>资讯缩图：</dt>
            <dd>
                <input id="testFileInput" type="file" name="image"
                       uploaderOption="{
                swf:'<?php echo DWZ_URL; ?>uploadify/scripts/uploadify.swf',
                uploader:'<?php echo DWZ_URL; ?>demo/common/ajaxDone.html',
                formData:{type:'edit'},
                buttonText:'请选择文件',
                fileSizeLimit:'200KB',
                fileTypeDesc:'*.jpg;*.jpeg;*.gif;*.png;',
                fileTypeExts:'*.jpg;*.jpeg;*.gif;*.png;',
                auto:true,
                multi:true,
                onUploadSuccess:uploadifySuccess,
                onQueueComplete:uploadifyQueueComplete
            }"
                    />
                <img src="<?php echo $info['picture']; ?>">
                <span class="inputInfo">上传该新闻的缩略图，注意图片选择要具有吸引力</span>
            </dd>
        </dl>
        <dl>
            <dt>资讯内容：</dt>
            <dd>
                <textarea name="content" id="content" style="height: 350px; width: 530px;"><?php echo $info['content']; ?></textarea>
            </dd>
        </dl>
	</div>
	<div class="formBar">
		<ul>
			<li><div class="buttonActive"><div class="buttonContent"><button type="submit">确认</button></div></div></li>
			<li><div class="button"><div class="buttonContent"><button class="close" type="button">关闭</button></div></div></li>
		</ul>
	</div>
</div>
</form>
<script type="text/javascript">

    //动态加载 Kindeditor 文本编辑器
    var  content ;
    $.getScript('<?php echo KINDEDITOR_URL; ?>kindeditor-min.js', function() {
        KindEditor.basePath = '<?php echo KINDEDITOR_URL; ?>';
        content = KindEditor.create('textarea[name="content"]');
    });
</script>